<include file="Public/header"/> 
            <section class="content">
        <form class="form" method="post" action="__APP__/Index/update" enctype="multipart/form-data">
        <input type="hidden" name= "id"  value="{$list.id}">
            <div class="box box-primary">
                <div class="box-header with-border">
                    <h3 class="box-title">修改</h3>
                </div>
                <div class="box-body">
                       <div class="form-group">
                      <label class="form-title" for="solve_images_add" >图片url:</label>
                        <input type="texr" readonly="true" id="news_img" name="image_url" value="{$list.url}" />  <input value="点击上传图片" onclick="upImage();" type="button"/>
                    </div>
                 <div class="form-group">
                        <label>图片标题</label>
                        <input type="text" name="title" class="form-control" value="{$list.title}" required style="width: 400px;">
                    </div>


                 <label for="heard">选择类型:</label>
                    <select id="heard" class="form-control" required  name="type" style="width: 360px;">
                     <option value="-1">默认</option>
                    <volist name="type" id="vo">
                        <option value="{$vo.type_id}">{$vo.type_name}</option>
                    </volist>
                </select>


                 <label for="heard">选择内容类型:</label>
                    <select id="heard" class="form-control" required  name="ctype" style="width: 360px;">
                     <option value="-1">默认</option>
                    <volist name="ctype" id="vo">
                        <option value="{$vo.ctype_id}">{$vo.ctype_name}</option>
                    </volist>
                </select>
                
                 <label for="heard">选择组图:</label>
                    <select id="heard" class="form-control" required  name="zutu" style="width: 360px;">
                    <option value="-1">默认</option>
                    <volist name="zutu" id="vo">
                        <option value="{$vo.zutu_id}">{$vo.zutu_name}</option>
                    </volist>
                </select>
               <div class="form-group">
                  <label >选择人名（图片包含的名字）:</label></br> 
               <volist name="name" id="vo">
                       <label class="checkbox-inline">
                          <input type="checkbox"  name="name_{$vo.name_id}" value="{$vo.name_id}">{$vo.name_name}
                       </label>
              </volist>
               </div>
                   <div class="form-group">
                        <label>排序(数值也大越前):</label>
                        <input type="text" name="sort" class="form-control" value="{$list.sort}" required value="1" style="width: 360px;">
                    </div>

                 <div class="form-group">
                        <label>图片时间:</label>
                        <input name="time" readonly="readonly" class="laydate-icon" value="{$list.img_time}" style="width: 285px;padding: 0px;height: 34px;" type="text" id="start_time" size="15">
                    </div>

                   <label for="message">内容:</label>
                    <textarea id="message" rows="10" required="required" class="form-control" name="message" data-parsley-trigger="keyup" placeholder="请填写内容...">{$list.content}</textarea>
                    </div>
                </div>
                <div class="box-footer">
                    <button type="submit" class="btn btn-primary">保存</button>
                    <button type="submit" onclick="history.back()" class="btn btn-default pull-right">返回</button>
                </div>
            </div>
        </form>
    </section>
   <!--弹窗插件-->
<script type="text/javascript" src="__PUBLIC__/laydate/laydate.dev.js"></script>

<script type="text/javascript">
  laydate({
        elem: '#start_time',
        //festival: true, //显示节日
        istime: true,
        format: 'YYYY-MM-DD'
    });

    </script>
    <script type="text/plain" id="j_ueditorupload" style="height:5px;display:none;" ></script>
                        <!--注册百度ueditor-->  
                            <script>
                            //实例化编辑器
                            var o_ueditorupload = UE.getEditor('j_ueditorupload',
                                    {
                                        autoHeightEnabled: false
                                    });
                            o_ueditorupload.ready(function()
                            {
                                o_ueditorupload.hide(); //隐藏编辑器
                            });
                            //监听图片上传
                            o_ueditorupload.addListener('beforeInsertImage', function(t, arg)
                            {
                                // alert('这是图片地址：' + arg[0].src);
                                $("#news_img").val(arg[0].src);
                            });
                            //弹出图片上传的对话框
                            function upImage()
                            {
                                var myImage = o_ueditorupload.getDialog("insertimage");
                                myImage.open();
                            }
                 


         </script>       
          <include file="Public/footer"/>   
